<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page language="java" import="com.soft.model.*"%>
<%@ page language="java" import="java.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<link rel="stylesheet" href="../../css/common.css" />
		<div class="title-area bg-color-black font-normal font-white">乌托邦别墅预定管理平台>内容管理>编辑店面</div>
	<!-- user_detail -->
	<form action="store_doupdate" method="post">
		<div class="edit-area">
			<div class="container">
				<div class="row">
					<div class="title">编辑店面</div>
				</div>
				<input type="hidden" name="id" value="${store.id }">
				<input type="hidden" name="userId" value="${user_login.id }">
				<div class="row">
					<div class="label">更新者</div>
					<input type="text"  class="edit" name="adduser" value="${user_login.usercname}" readonly/>
				</div>
				<div class="row">
					<div class="label must">店面名</div>
					<input type="text" class="edit" name="storename" value="${store.storename }"/>
				</div>
				<div class="row">
					<div class="label must">联系电话</div>
					<input type="text" class="edit" name="storeTel" value="${store.storeTel }"/>
				</div>
				<div class="row">
					<div class="label must">所在城市</div>
					<select class="edit" name="cityId">
						<option value="0">==选择城市==</option>
					<%
						Store store = (Store) request.getAttribute("store");
						int cityId=0;
						if(store!=null){
							cityId = store.getCityId();
						}
						List<City> list_city = (List<City>) request.getAttribute("list_city");
						if (list_city != null && list_city.size() > 0) {
							for (City city : list_city) {
								pageContext.setAttribute("city", city);
								String selected="";
								if(cityId==city.getId()){
									selected="selected";
								}
					%>	
						<option value="${city.id }" <%=selected %>>${city.cityname}</option>
					<%
						}
						}
					%>
					</select>
				</div>
				<div class="row">
					<div class="label must">店面地址</div>
					<input type="text" class="edit" name="storeAddr" value="${store.storeAddr }"/>
				</div>
				<div class="row">
				</div>
				<div class="row">
					<span style="color: red;font-size: xx-small;">${errMsg}</span>
<!-- 					<button id="cancel" class="font-white button-del font-normal">取消</button> -->
					<button id="save" class="font-white button-put font-normal">保存</button>
				</div>
				
			</div>
		</div>
		</form>
		
</html>